package com.bc.bcmodel.enums;

/**
 * @Name IntegralRecordEnum
 * @Description 积分记录枚举
 * @Author douhaichao
 * @Date 2018/9/4 16:09
 * @Version 1.0
 **/
public enum IntegralRecordEnum {
    ZCYH("注册用户", 50),
    LLICO("浏览ICO", 5),
    JRXH("加入喜欢", 20),
    SCICO("收藏ICO", 50),
    DBICO("打标ICO", 10),
    CYDBICO("参与打标ICO", 5),
    YWFXICO("业务分析ICO", 100),
    DMFXICO("代码分析ICO", 100),
    DZZYFX("点赞专业分析", 10),
    CZYFX("踩专业分析", 5),
    SXICOTX("设置ICO提醒", 10),
    GMICO("购买ICO", 100),
    YQHYZC("邀请好友注册", 50),;

    private String key;
    private int value;

    private IntegralRecordEnum(String key, int value) { // 必须是private的，否则编译错误
        this.key = key;
        this.value = value;
    }

    public int value() {
        return this.value;
    }

    public String key() {
        return this.key;
    }

    public static IntegralRecordEnum getEnum(String key) {
        for (IntegralRecordEnum c : IntegralRecordEnum.values()) {
            if (c.key().equals(key)) {
                return c;
            }
        }
        return null;
    }
}
